DEMO 1: There must be a better way of reusing code than recreating it or copying-and-pasting!

In previous lessons, you learned that variables can hold values like a sprite, a string, or numbers.

A list is a variable that stores a group of values in a specific order. A list starts and ends with brackets, and items in the list are separated by commas.

  • Click Run and follow the instructions on the stage to guide you through the example.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)